{extend name="public:_base_login" /}

{block name="main"}

<!--整体内容开始-->
<div class="container-fluid forget-box">

    <div class="container">
        <!-- 标题 -->
        <div class="forget-title">
            <h2><i class="glyphicon glyphicon-hand-right"></i>重置密码</h2>
        </div>
        <!-- #标题 -->

        <!-- 填写内容 -->
        <div class="forget-cont">
            <form class="form form-horizontal" action="" method="post" id="form">
                <div class="form-group">
                    <label for="userName">帐号</label>
                    <input type="text" class="form-control" id="userName" name="name" placeholder="{:lang('Please fill in the account')}" datatype="*" nullmsg="{:lang('Please fill in the account')}">
                </div>

                <div class="form-group">
                    <label for="userPassword">新的密码</label>
                    <input type="password" class="form-control" id="userPassword" name="password" placeholder="{:lang('enter password')}" datatype="*6-16" nullmsg="{:lang('enter password')}" errormsg="{:lang('Password range between 6 ~ 16!')}">
                </div>

                <div class="form-group">
                    <label for="userConfirmpassword">确认新的密码</label>
                    <input type="password" class="form-control" id="userConfirmpassword" name="password_confirm" placeholder="{:lang('confirm password')}" datatype="*" recheck="password" nullmsg="{:lang('Please re-enter the password!')}" errormsg="{:lang('You enter the account password twice inconsistent!')}">
                </div>

                <div class="form-group form-captcha">
                    <label for="userCaptcha">验证码</label>
                    <input type="text" class="form-control" id="userCaptcha" name="captcha" placeholder="{:lang('code')}" datatype="*" nullmsg="{:lang('Please fill in the verification code!')}">
                    <img id="captcha" src='{:captcha_src()}' onclick='this.src = "{:captcha_src()}"' alt='{:lang('code')}' title='看不清验证码，点击刷新!'/>
                </div>

                <div class="form-group">
                    <input name="" type="submit" class="btn radius btn-success radius size-L" value="&nbsp;{:lang('save')}&nbsp;">
                    <input name="" type="reset" class="btn radius btn-default radius size-L" value="&nbsp;{:lang('cancel')}&nbsp;">
                    <a class="btn radius btn-default radius size-L" href="{:url('login/index')}">{:lang('Already have an account? Login')}</a>
                </div>
            </form>
        </div>
        <!-- #填写内容 -->

    </div>

</div>
<!--整体内容结束-->

<!-- 底部信息 -->
<div class="container-fluid foot foot-login">

    <div class="container">

        <!-- 底部信息 -->
        <div class="foot-info">
            {$system.count.value}
        </div>
        <!-- #底部信息 -->

    </div>

</div>
<!-- #底部信息 -->
{/block}

{block name="js"}
<script type="text/javascript" src="__STATIC__/admin/hui/lib/Validform/v5.3.2/Validform_v5.3.2_min.js"></script>
<script type="text/javascript">
    $("#form").Validform({
        tiptype: 2,
        ajaxPost: true,
        showAllError: true,
        callback: function (data) {
            if (data.status == "y") {
                location.href = '{$Request.get.callback ?: \\think\\Url::build("index/index")}';
            } else {
                setTimeout(function () {
                    $.Hidemsg(); //公用方法关闭信息提示框;显示方法是$.Showmsg("message goes here.");
                }, 1500);
                $("#captcha").click();
                $("[name='captcha']").val('');
            }
        }
    });
</script>
{/block}